home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DJLGR106.ARJ / INT10.S < prev    next >
Text File  |  1991-03-06  |  2KB  |  87 lines

  1. /* This is file INT10.S */
  2. /*
  3. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15.      .file    "int10.s"
  16.     .version    "02.01"
  17.     .data
  18.     .comm    _int10_bp_save_area,4
  19.     .text
  20.     .align    4
  21.     .def    _int10;    .val    _int10;    .scl    2;    .type    044;    .endef
  22.     .globl    _int10
  23.  
  24. _int10:
  25.     pushl    %ebp
  26.     movl    %esp,%ebp
  27.     movl    %ebp,_int10_bp_save_area
  28.     pushl    %ebx
  29.     pushl    %ecx
  30.     pushl    %edx
  31.     pushl    %esi
  32.     pushl    %edi
  33.  
  34.     movl    8(%ebp),%eax
  35.  
  36.     pushl    (%eax)        /* EAX */
  37.     pushl    4(%eax)        /* EBX */
  38.     pushl    8(%eax)        /* ECX */
  39.     pushl    12(%eax)    /* EDX */
  40.     pushl    16(%eax)    /* ESI */
  41.     pushl    20(%eax)    /* EDI */
  42.     pushl    24(%eax)    /* EBP */
  43. /*    pushl    28(%eax)*/    /* ES */
  44. /*    popw    %es*/
  45.     popl    %ebp
  46.     popl    %edi
  47.     popl    %esi
  48.     popl    %edx
  49.     popl    %ecx
  50.     popl    %ebx
  51.     popl    %eax
  52.     int    $0x10
  53.     pushl    %eax
  54.     pushl    %ebx
  55.     pushl    %ecx
  56.     pushl    %edx
  57.     pushl    %esi
  58.     pushl    %edi
  59.     pushl    %ebp
  60. /*    pushw    %es */
  61.     movl    _int10_bp_save_area,%ebp
  62.     movl    8(%ebp),%eax
  63.  
  64. /*    popl    28(%eax)*/    /* ES */
  65. /*    andl    $0xffff,28(%eax) */
  66.     popl    24(%eax)    /* EBP */
  67.     popl    20(%eax)    /* EDI */
  68.     popl    16(%eax)    /* ESI */
  69.     popl    12(%eax)    /* EDX */
  70.     popl    8(%eax)        /* ECX */
  71.     popl    4(%eax)        /* EBX */
  72.     popl    (%eax)        /* EAX */
  73.     mov    28(%eax),%eax    /* return flags */
  74.  
  75.     popl    %edi
  76.     popl    %esi
  77.     popl    %edx
  78.     popl    %ecx
  79.     popl    %ebx
  80.     leave    
  81.     ret    
  82.  
  83.     .align    4
  84.     .def    _int10;    .val    .;    .scl    -1;    .endef
  85.     .data
  86.     .text
  87.